package com.contractpage.ec.service.impl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.contractpage.common.persistence.Page;
import com.contractpage.ec.dao.ContractStatusHistroyDao;
import com.contractpage.ec.service.ContractStatusHistroyService;
import com.contractpage.ec.entity.ContractStatusHistroy;



/**
 * 
 * ContractStatusHistroyServiceImpl数据库操作接口类
 * 
 **/
@Transactional
@Service
public class ContractStatusHistroyServiceImpl implements ContractStatusHistroyService{
	@Autowired
	private ContractStatusHistroyDao contractStatusHistroyDao;
	@Override
	public Page<ContractStatusHistroy> findList(Page<ContractStatusHistroy> page,ContractStatusHistroy entity){
		entity.setPage(page);
		page.setList(contractStatusHistroyDao.findList(entity));
		return page;
	}
	@Override
	public int insert(ContractStatusHistroy entity){
		entity.preInsert("");
		return contractStatusHistroyDao.insert(entity);
	}
	@Override
	public int update(ContractStatusHistroy entity){
		entity.preUpdate();
		return contractStatusHistroyDao.update(entity);
	}
	@Override
	public int delete(ContractStatusHistroy entity){
		 return contractStatusHistroyDao.delete(entity);
	}
}